#include "Airplane.h"
#include "Airport.h"
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#ifndef ATCSIMULATOR_H
#define ATCSIMULATOR_H

using namespace std;
class ATCSimulator
{
    public:
        ATCSimulator(int numAirplanes, int numAirports, int delayLeeway, int timeLimit);
        virtual ~ATCSimulator();
        vector<Airplane> airplanes;
        vector<Airport> airports;
        vector<vector<Edge> > edges;
        int curTime;
        int timeLimit;
        int delayLeeway;
        double ** distMatrix;
        vector<vector<vector<vector<int > > > > lookupTable;
        map <string, int> stateList;
        vector<State*> states;


        void startSimulation();
        void resetSimulation(int numPlanes);
        void update();
        bool simulatorDone();
        void updateEdges(Airplane plane);
        double getReward();
        void createAirplane();
        State* getState(Airplane plane);
        void updateAgents(vector<double> rewardList, vector<pair<State*,Actions> > stateActionPairs, int t, int rewardStep);
        void updateAgents(vector<double> rewardList, vector<dataStruct> stateActionPairs, int t, int rewardStep);
    protected:
    private:
};

#endif // ATCSIMULATOR_H
